package net.ge.mosq.utils
{
	import mx.collections.ArrayCollection;
	import mx.rpc.events.FaultEvent;
	import mx.rpc.events.ResultEvent;
	import mx.rpc.http.HTTPService;
	
	public class XmlParser
	{
		private static var xmlParser:XmlParser;
		private static var error:String;
		public static function getInstance():XmlParser
		{
			if(xmlParser == null)
			{
				xmlParser == new XmlParser();
				
			}
			return XmlParser.xmlParser;
		}
		
		public function getTypes(xmlData:XMLList, parentType:String):ArrayCollection
		{
			
			/* if(parentType == null)
			{ */
				return getAllTypes(xmlData);
			/* } */
		}
		private function getAllTypes(xmlData:XMLList):ArrayCollection
		{
			var allTypes:ArrayCollection = new ArrayCollection();
			for each(var xml:XML in xmlData)
            {
            	allTypes.addItem(xml.@name);
            }
            return allTypes;
		}
		
		private function getCommonAccounts()
	}
}